package com.hanbang.cxgz_2.pressenter.jianghu;

import com.hanbang.cxgz_2.appliction.base.presenter.BasePresenter;
import com.hanbang.cxgz_2.view.jianghu.iview.IJianghuView;

/**
 * Created by Administrator on 2016/8/8.
 */

public class JianghuPresenter extends BasePresenter<IJianghuView> {


//    public void getHttpData(final boolean isStart) {
//        if (isStart) {
//            mvpView.clearPagingData();
//        }
//        mvpView.getLoadingAndRetryManager();
//        HttpCallBack.Buider buider = new HttpCallBack.Buider(this).setShowLoadding(false).setLoadingAndRetryManager(mvpView.getLoadingAndRetryManager()).
//                setStatusChangListener(mvpView.getStatusChangListener()).setSwipeRefreshLayout(mvpView.getSwipeRefreshLayout());
//        final HttpCallBack httpCallBack = new HttpCallBack<HttpResult<List<OrderDetailData>>>(buider) {
//            @Override
//            public void onNext(HttpResult<List<OrderDetailData>> result) {
//                super.onNext(result);
//                //进行data处理
//                if (result.getCode() == 0) {
//                    if (isStart) {
//                        mvpView.clearData();
//                    }
//                    mvpView.setData((List<OrderDetailData>) mvpView.getValidData(result.getData()));
//                }
//            }
//        };
//        HttpRequest.getDetaisData(httpCallBack, 3, "time", "2014-07-29 00:00:00", mvpView.getPageindex(), mvpView.getPageCount());
//    }
//
//    public void postFile(List<String> path) {
//        HttpCallBack.Buider buider = new HttpCallBack.Buider();
//        final HttpProgressCallBack httpCallBack = new HttpProgressCallBack<HttpResult<List<OrderDetailData>>>(buider) {
//            @Override
//            public void onLoading(long progress, long total, boolean done, boolean isUpdate) {
//                Log.e("onLoading", "progress = " + progress + "  total = " + total + "    done=" + done + "   isUpdate=" + isUpdate);
//            }
//
//            @Override
//            public void onNext(HttpResult<List<OrderDetailData>> result) {
//                super.onNext(result);
//                //进行data处理
//            }
//        };
//        HttpRequest.postFile(httpCallBack, 10, "aaa", "description", path);
//    }


}
